﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
		<c:set var="ctx" value="${pageContext.request.contextPath}" />
		<html>

		<head>
			<link rel="stylesheet" href="${ctx}/common/common.css">
			<meta charset="utf-8">
			<title>工艺管理详细</title>
			<meta name="renderer" content="webkit">
			<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
			<meta name="viewport"
				content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
			<link rel="stylesheet" href="${ctx}/common/plugins/layuiadmin/layui/css/layui.css" media="all">
			<link rel="stylesheet" href="${ctx}/common/plugins/layuiadmin/layui/css/modules/layer/default/layer.css"
				media="all">
			<link rel="stylesheet" href="${ctx}/common/plugins/layuiadmin/style/admin.css" media="all">
			<script src="${ctx}/common/plugins/layuiadmin/layui/layui.js"></script>

			<style>
				.layui-table-header {
					width: 100%;
				}

				.layui-table-header th {
					width: 20%;
					text-align: center;
				}

				.layui-products {
					border-bottom: 2px solid #e7e7e7;
					/*border-top: 2px solid #e7e7e7;*/
					margin: 10px 0px;
					padding: 5px 0px;
				}

				.layui-products_li {
					margin-left: 50px;
					border-bottom: 1px dashed #e7e7e7;
				}

				.layui-products_li:first-child {
					border: none;
				}

				.layui-col-md4 img {
					margin-right: 5px;
					width: 22px;
					height: 22px;
				}

				.layui-col-md4 img {
					margin-right: 5px;
					width: 22px;
					height: 22px;
				}

				.valtop {
					padding: 9px
				}
			</style>
		</head>

		<body>
			<!--主体内容层-->
			<form class="layui-form layui-col-md12" action="${ctx}/inspStandard/inspStandardSave">
				<div class="layui-fluid">
					<button type="button" id="rollback" class="layui-btn layui-btn-primary goback">返回</button>
					<div class="layui-row layui-col-space15">
						<input type="hidden" id="processId" name="processId" value="${proess.id }">
						<!--输入框内容盒子-->
						<div class="layui-col-md12">
							<div class="layui-form-item layui-col-md6">
								<label class="layui-form-label">工艺编码：</label>
								<div class="layui-input-block valtop">${proess.code }</div>
							</div>
							<div class=" layui-col-md6">
								<label class="layui-form-label">工艺名称：</label>
								<div class="layui-input-block valtop">${proess.name }</div>
							</div>
						</div>
						<div class="layui-col-md12" style="padding-top: 10px; padding-bottom: 10px">
							<div class="layui-btn-group demoTable">
								<button class="layui-btn layui-btn-sm" id="editProcess" type="button"
									data-type="editProcess">
									<i class="layui-icon">编辑</i>
								</button>
							</div>
						</div>
					</div>
					<div class="layui-card">
						<div id="addCard" class="layui-card-body"
							style="padding: 10px 0px; border-top: 1px solid #e7e7e7;">
							<c:forEach items="${proess.tTechnicIndexList }" var="technic">
								<div class="layui-row" style="border-bottom: 1px dashed #e7e7e7;">
									<div class="layui-row layui-col-space10 layui-products_li" style="border: none;">
										<div class="layui-col-md6 valtop">指标代码： ${technic.code }</div>
										<div class="layui-col-md6 valtop">采集方式：
											<c:if test="${technic.quota_type == 1 }">手工录入</c:if>
											<c:if test="${technic.quota_type == 2 }">设备采集</c:if>
										</div>
									</div>
									<div class="layui-row layui-col-space10 layui-products_li" style="border: none;">
										<div class="layui-col-md6 valtop">指标名称： ${technic.name }</div>
										<div class="layui-col-md6 valtop">是否公开：
											<c:choose>
												<c:when test="${technic.share_stat == 0 }">否</c:when>
												<c:otherwise>是</c:otherwise>
											</c:choose>
										</div>
									</div>
									<div class="layui-row layui-col-space10 layui-products_li" style="border: none;">
										<div class="layui-col-md6 valtop">指标单位： ${technic.unit }</div>
										<div class="layui-col-md6 valtop">是否必填：
											<c:choose>
												<c:when test="${technic.isInput == 0 }">否</c:when>
												<c:otherwise>是</c:otherwise>
											</c:choose>
										</div>
									</div>
									<div class="layui-row layui-col-space10 layui-products_li" style="border: none;">
										<div class="layui-col-md6 valtop">采集类型：
											<c:if test="${technic.gather_method == 1 }">字符</c:if>
											<c:if test="${technic.gather_method == 2 }">数值</c:if>
											<c:if test="${technic.gather_method == 3 }">日期</c:if>
											<c:if test="${technic.gather_method == 4 }">日期时间</c:if>
											<c:if test="${technic.gather_method == 5 }">图片</c:if>
											<c:if test="${technic.gather_method == 6 }">音视频</c:if>
										</div>
										<div class="layui-col-md6 valtop">描述： ${technic.described }
										</div>
									</div>
								</div>
							</c:forEach>
							<!-- <div class="layui-form-item">
						<div class="layui-input-block">
							<button type="button" id="rollback"
								class="layui-btn layui-btn-primary">返回</button>
						</div>
					</div> -->
						</div>
					</div>
				</div>
			</form>
			<script type="text/javascript">
				document.getElementById("rollback").addEventListener("click",
					function () {
						window.location.href = '${ctx}/process/processList';
					});
				layui.use(['jquery', 'layer'], function () {
					var $ = layui.$ //重点处
						, layer = layui.layer;

					$(document).on('click', '#editProcess', function () {
						var processId = document.getElementById("processId").value;
						//编辑页
						window.location.href = '${ctx}/process/processEdit?processId=' + processId;
					})
				});
			</script>
		</body>

		</html>